package org.hypnus.e.tag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTag;
import javax.servlet.jsp.tagext.BodyTagSupport;

import org.hypnus.e.util.TagUtil;

public class InitTag extends BodyTagSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String serviceName ;
	

	private String action ;
	
	private String method ;

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}
	
	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	@Override
	public int doEndTag() throws JspException {
		
		TagUtil.getInstance().prepareClient(this.pageContext) ;
		return BodyTag.EVAL_PAGE;
	}

	@Override
	public int doStartTag() throws JspException {
		
		return BodyTag.EVAL_BODY_INCLUDE;
	}
	
	
	@Override
	public void release() {
		super.release();
		this.action = null ;
		this.method = null ;
	}
	
	
}
